#!/usr/bin/python
from __future__ import generators
import operator,sys,math
from random import *
from string import *

def selections(items, n):
    if n==0: yield []
    else:
        for i in items:
            for ss in selections(items, n-1):
                yield [i]+ss
            
def xuniqueCombinations(items, n):
    if n==0: yield []
    else:
        for i in xrange(len(items)):
            for cc in xuniqueCombinations(items[i+1:],n-1):
                yield [items[i]]+cc

def AND(val,op=[]):
    if len(op) == 0:
        op = range(4)
    for vpos in op:
        if val[5-vpos] == '0':
            return '0'
    return '1'

def OR(val,op=[]):
    if len(op) == 0:
        op = range(4)
    for vpos in op:
        if val[5-vpos] == '1':
            return '1'
    return '0'


def generaOpConf(fun,ops):
    resList = []
    for val in selections('01',5):
        resList.append(fun(val, ops))
    
    #resList = resList[::-1]
    return int("".join(resList),2)

def main():
    
    for ops in xuniqueCombinations("1234",2):
        print """{"OR%s", 0x%08X},""" % ("".join(ops), generaOpConf(OR,[int(op) for op in ops]))
        #print generaOpConf(AND,[0])
    
    
if __name__ == "__main__":
    main()